<!-- block -->
<div class="block">
    <div class="navbar navbar-inner block-header">
        <div class="muted pull-left"></div>
    </div>
    <div class="block-content collapse in">
        <div class="span12">
           <div class="table-toolbar">
              <div class="btn-group" ng-repeat="btn in toollist">
                 <a ng-if="btn.type=='add'" dy-add="{url:btn.url,title:btn.text,cb:refresh}"><button class="btn btn-success" >{{btn.text}} <i class="icon-plus icon-white"></i></button></a>
                 <a ng-if="btn.type=='edit'" layer-open="{url:btn.url,title:btn.text,id:tableB[curSel].id,needId:true,cb:refresh}"><button class="btn btn-success" >{{btn.text}} <i class="icon-edit icon-white"></i></button></a>
                 <a ng-if="btn.type=='del'" layer-confirm="{url:btn.url,title:btn.text,id:tableB[curSel].id,needId:true,cb:refresh}"><button class="btn btn-success" >{{btn.text}} <i class="icon-remove icon-white"></i></button></a>
                 <a ng-if="btn.type=='confirm'" layer-confirm="{url:btn.url,title:btn.text}"><button class="btn btn-success" >{{btn.text}} <i class="icon-refresh icon-white"></i></button></a>
              </div>
              <div class="btn-group pull-right" ng-if="exportTable">
                 <button data-toggle="dropdown" class="btn dropdown-toggle">操作 <span class="caret"></span></button>
                 <ul class="dropdown-menu">
                    <li><a ng-href="/exportExcel/{{exportTable}}">导出</a></li>
                    <li><a href="javascript:;" dy-add="{url:'toImportExcel/'+exportTable,title:'导入'}">导入</a></li>
                 </ul>
              </div>
           </div>
           <div class="row pull-right">
	           <div class="span12" ng-if="search" >
	           <form class="form-horizontal">
		           <div class="control-group" ng-repeat="list in search">
			           <label class="control-label" title="{{list.text}}" ng-bind="list.text"></label>
			           <div class="controls" >
			             <input class="input-xlarge focused" placeholder="{{list.placeholder}}" name="{{list.name}}" type="text" ng-model="srcData[list.name]">
				       <button type="submit" class="btn" ng-click="gotoPage(1)">搜索</button>
			           </div>
			       </div>
			   </form>
	           </div>
           </div>
            
            <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" >
                <thead>
                    <tr>
                        <th ng-repeat="item in tableHeader">{{item.text}}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="{{$index%2?odd:even}}" ng-class="{success:$index==curSel}" ng-click="select($index)" ng-repeat="item in tableB">
                        <td ng-repeat="head in tableHeader" >
                        	<span ng-if="head.type==''">{{item[head.name]}}</span>
                        	<span ng-if="head.type=='yuan'">{{item[head.name]/100 | number:2}}</span>
                        	<span ng-if="head.type=='date'">{{item[head.name] | timestamp | date:'yyyy-MM-dd'}}</span>
                        	<span ng-if="head.type=='datetime'">{{item[head.name] | timestamp | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="pagination " style="float: right;">
              <ul>
                <li><a href="javascript:;" ng-click="firstPage()">首页</a></li>
                <li><a href="javascript:;" ng-click="prevPage()">上一页</a></li>
                <li ng-class="{active:item == reloadPage}" ng-repeat="item in pageLis">
                  <a  href="javascript:;" ng-click="gotoPage(item)">{{item}}</a>
                </li>
                <li><a href="javascript:;" ng-click="nextPage()">下一页</a></li>
                <li><a href="javascript:;" ng-click="lastPage()">末页</a></li>
              </ul>
            </div>
        </div>
    </div>
</div>
<!-- /block -->